package com.liliudong.cursormate.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liliudong.cursormate.common.constant.ConfigConst;
import com.liliudong.cursormate.entity.SysPermission;
import com.liliudong.cursormate.mapper.SysPermissionMapper;
import com.liliudong.cursormate.service.SysPermissionService;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Liudong.li
 * @description 针对表【sys_permission(系统权限表)】的数据库操作Service实现
 * @createDate 2023-10-24 22:29:24
 */
@Service
@ConditionalOnProperty(name = {ConfigConst.CURSOR_MATE_POLICY}, havingValue = ConfigConst.CURSOR_MATE_POLICY_RULE)
public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, SysPermission>
        implements SysPermissionService {

    @Override
    public List<String> getPermissionList(Long userId) {
        return baseMapper.selectPermissionListByUserIdInterceptorIgnore(userId);
    }
}




